package com.cn.longdistancebusstation.scenic.order;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.cn.longdistancebusstation.R;
import com.cn.longdistancebusstation.base.BaseActivity;
import com.cn.longdistancebusstation.model.ScenicOrderList;

/**
 * Created by mucheng on 2018/3/30.
 */

public class PreUseOrderDetailsActivity extends BaseActivity implements View.OnClickListener{
    private TextView mOrderStatusTextView;
    private ImageView mQrcodeImageView;
    private TextView mVoucherCodeTextView;
    private TextView mOrderTitleTextView;
    private TextView mOrderTotalPriceTextView;
    private ImageView mOrderNoteImageView;
    private TextView mTouristNameTextView;
    private TextView mTouristCardNoTextView;
    private TextView mTouristTelephoneTextView;
    private TextView mOrderIdTextView;
    private TextView mOnlineOrderTimeTextView;
    private ScenicOrderList mScenicOrderList;
    private TextView mUseSituationTextView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pre_use_order_detail);
        getTitleTextView().setText("订单详情");
        initView();
    }

    private void initView() {
        Intent in=getIntent();
        mScenicOrderList=(ScenicOrderList)in.getSerializableExtra("orderInfo");
        mOrderStatusTextView=(TextView)findViewById(R.id.textView_status);
        mQrcodeImageView=(ImageView)findViewById(R.id.imageView_qrcode_image);
        mQrcodeImageView.setOnClickListener(this);
        mVoucherCodeTextView=(TextView)findViewById(R.id.textView_voucher_code_details);
        mOrderTitleTextView=(TextView)findViewById(R.id.scenic_name);
        mOrderTotalPriceTextView=(TextView)findViewById(R.id.amount_prices);
        mOrderNoteImageView=(ImageView)findViewById(R.id.imageView_order);
        mTouristNameTextView=(TextView)findViewById(R.id.tourist_name);
        mTouristCardNoTextView=(TextView)findViewById(R.id.idcard_numbers);
        mTouristTelephoneTextView=(TextView)findViewById(R.id.telephone_number);
        mOrderIdTextView=(TextView)findViewById(R.id.order_number_details);
        mOnlineOrderTimeTextView=(TextView)findViewById(R.id.textView_time);
        mUseSituationTextView=(TextView)findViewById(R.id.use_situation);

    }

    @Override
    public void onClick(View view) {
        switch(view.getId()){
            case R.id.imageView_qrcode_image:
                Intent in=new Intent(PreUseOrderDetailsActivity.this,ScheduleNoteActivity.class);
                startActivity(in);
                break;
        }
    }
}
